package com.lrs.java.j2se_self.net;
import java.net.*;
import java.io.*;
	
public class UDPClient {
	public static void main(String[] args){
		byte[] b = new String("hello").getBytes();
		try{
			DatagramPacket dp = new DatagramPacket(b,b.length,new InetSocketAddress("127.0.0.1",5678));
			DatagramSocket ds = new DatagramSocket(9999);
			ds.send(dp);
			ds.close();
		}catch(SocketException se){
			se.printStackTrace();
		}catch(IOException e){
			e.printStackTrace();
		}

	}
}
